//调用接口配置文件
import { request } from 'config/request'

// 获取省市区
export async function queryAllAddress(params) {
	return request({
		url: 'admin/address/queryAllAddress',
		method: 'GET',
		data: params,
	});
};

// 获取市对应的楼盘
export async function getCityEstateList(params) {
	return request({
		url: 'admin/estate/adminList',
		method: 'POST',
		data: params,
	});
};

// 新建优惠券
export async function addCoupon(params) {
	return request({
		url: 'admin/coupons/config/create',
		method: 'POST',
		headers: {
			"Content-type": "application/json"
		},
		data: params,
	});
};

// 修改优惠券
export async function editCoupon(params) {
	return request({
		url: 'admin/coupons/config/update',
		method: 'POST',
		headers: {
			"Content-type": "application/json"
		},
		data: params,
	});
};

// 获取优惠券详情
export async function getCouponDetail(params) {
	return request({
		url: 'admin/coupons/config/retrieve',
		method: 'GET',
		data: params,
	});
};